<template>
  <div class="right-container">
    <h3>Right 组件 {{count}}</h3>
    <div>{{filterList}}</div>
    <hr />

    <p>count 值：</p>
    <button @click="subminus(5)" class="btn btn-warning">-1</button>
    <button @click="getasyancCount(222)" class="btn btn-warning">异步函数调用</button>
  </div>
</template>

<script>
//导入辅助函数
import { mapState, mapMutations, mapActions, mapGetters } from 'vuex'
export default {
  name: 'Right',

  computed: {
    ...mapState(['count']),
    ...mapGetters(['filterList'])
  },
  methods: {
    ...mapMutations(['subminus']),
    ...mapActions(['getasyancCount'])
  }
}
</script>

<style>
</style>
